package com.nowcoder;

import java.util.Scanner;

public class EgyptToProperFraction {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextLine()) {
            String line = scanner.nextLine();
            System.out.println(solver(line));;
        }
    }

    private static String solver(String line) {
        String[] strs = line.split("/");
        int numerator = Integer.valueOf(strs[0]);
        int denominator = Integer.valueOf(strs[1]);
        StringBuilder builder = new StringBuilder(64);
        // 将真分数分解成埃及分数; 由于输入的是真分数，所以分母肯定大于分子
        while (denominator % numerator != 0) {
            int c = denominator / numerator + 1;
            numerator = numerator * c - denominator;
            denominator = denominator * c;
            builder.append(1).append("/").append(c).append("+");
        }
        builder.append(1).append("/").append(denominator / numerator);

        return builder.toString();
    }
}
